#include "quaternion.h"
/*
quaternion::quaternion() 
{
	w = x = y = z = 0;
}

quaternion::quaternion(float _w,float _x,float _y, float _z) 
{
	w=_w; x = _x; y = _y; z = _z;
}*/

// Overload subtraction. 
quaternion quaternion::operator-(quaternion op2) 
{ 
  quaternion temp; 
  temp.w = w - op2.w;  
  temp.x = x - op2.x; 
  temp.y = y - op2.y; 
  temp.z = z - op2.z; 
  return temp; 
}
 
// Overload +. 
quaternion quaternion::operator+(quaternion op2) 
{ 
  quaternion temp; 
  temp.w = w + op2.w;  
  temp.x = x + op2.x;  
  temp.y = y + op2.x;  
  temp.z = z + op2.z;  
  return temp; 
} 
 
// Overload assignment. 
quaternion quaternion::operator=(quaternion op2) 
{ 
  w = op2.w;  
  x = op2.x;  
  y = op2.y;  
  z = op2.z;  
  return *this; 
} 

quaternion quaternion::operator&(quaternion op2)
{
  w = op2.w;  
  x =-op2.x;  
  y =-op2.y;  
  z =-op2.z;  
  return *this; 

}


